<link href="../Public/Css/style.css" rel="stylesheet" type="text/css" />
<!-- 加载头部公共文件 -->
<include file="../Public/head" />
<link rel="stylesheet" type="text/css" href="/Public/Js/DTree/dtree.css">
<script type="text/javascript" src="/Public/Js/DTree/dtree.js"></script>
<form action="__URL__/update" method='post' enctype="multipart/form-data" onsubmit="return validate()" >
  <table width="98%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="8" height="8"><img src="../Public/images/index1_28.gif" width="8" height="39" /></td>
      <td width="99%" background="../Public/images/index1_40.gif">&nbsp;</td>
      <td width="8" height="8"><img src="../Public/images/index1_43.gif" width="8" height="39" /></td>
    </tr>
    <tr>
      <td background="../Public/images/index1_45.gif"></td>
      <td bgcolor="#FFFFFF" style="height:490px; vertical-align:top;">
      	<table width="100%" border="0" cellspacing="10" cellpadding="0">
          <tr>
            <td bordercolor="#DAEEF7">
            	<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#BBD3EB" id="tb_list">
                <tr>
                  <td height="27" colspan="2" align="center" background="../Public/images/index1_72.gif" bgcolor="#FFFFFF" class="bold">
                  		修改栏目(<span class="require"></span>为必填字段)</td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="26" align="center" class="right_align">上级栏目：</td>
                  <td  align="center" class="left_align">{$vo.pid|toSortName}<input name="pid" id="pid" type="hidden" value="{$vo.pid}">
                  <input name="id" type="hidden" id="id" value="{$vo.id}"></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  	<td width="15%" height="26" align="center" class="right_align"><span class="tRight">栏目名称</span>：</td>
                  <td  align="center" class="left_align">
					<input name="name" type="text" id="name" value="{$vo.name}" v_type="require" v_errMsg="请填写栏目名称">
					<span class="require"></span>
				</td>
                  </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="26" align="center" class="right_align"> 链接： </td>
                  <td  align="center" class="left_align"><input name="link" type="text" id="link" value="{$vo.link}" size="60" maxlength="255" >
                      <span class="f_remark">栏目的跳转链接</span></td>
                </tr>

                <tr bgcolor="#FFFFFF">
                  <td height="26" align="center" class="right_align"><span class="tRight">显示序号</span>：</td>
                  <td align="center" class="left_align"><input name="sort" type="text" id="sort" value="{$vo.sort}"></td>

                </tr>
                <tr bgcolor="#FFFFFF">

                  <td class="right_align">列表页模板：</td>
                    <td  >
                    	<select name="list_tpl_id" id="list_tpl_id">
                    	<volist name="list_tpl" id="v">
                    		<option value="{$v.id}" <eq name="v.id" value="$vo.list_tpl_id">selected</eq> >{$v.title}</option>
                    	</volist>
                    	</select>
                    </td>
                  </tr>
                <tr bgcolor="#FFFFFF">
                  <td class="right_align">内容页模板：</td>
                  <td  >
                  	<select name="content_tpl_id" id="content_tpl_id">
                  		<volist name="content_tpl" id="v">
                    		<option value="{$v.id}" <eq name="v.id" value="$vo.content_tpl_id">selected</eq> >{$v.title}</option>
                    	</volist>
                    </select>                    
                  </td>
                </tr>
                <tr bgcolor="#FFFFFF">
						<td class="right_align">表单：</td>
						<td><select name="form_id" id="form_id">
							<option>--不使用表单--</option>
							<volist name="form_list" id="v">
							<option value="{$v.id}" <eq name="v.id" value="$vo.form_id">selected</eq> >{$v.title}</option>
							</volist>
						</select></td>
					</tr>
					<tr bgcolor="#FFFFFF">
						<td class="right_align">E-mail：</td>
						<td>
							<input type="text" name="email" id="email" value="{$vo.email}" />
						</td>
					</tr>
                <tr bgcolor="#FFFFFF">
                  <td class="right_align">栏目图片：</td>
                  <td  ><span class="left_align">
                    <input name="image" type="file" id="image">
					<notempty  name="vo.img" >
						<a href="javascript:show_img('{$img_dir}{$vo.img}')" >
							<img src="/Public/Images/imgfolder.gif"   border="0" align="absmiddle" id="artc_img" style="cursor:hand ">图片预览
						</a>
					</notempty> 
                    <span class="f_remark"> 栏目缩略图，建议大小：150x120</span></span></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td class="right_align">栏目摘要：</td>
                  <td  ><span class="left_align">
                    <textarea name="small_content"  style="width:80% " rows="6" id="small_content">{$vo.small_content}</textarea>
                  </span></td>
                </tr>


            </table></td>
          </tr>
          <tr>
            <td align="center"><table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
              <tr>
                <td align="center" bgcolor="#FFFFFF">
					<div class="impBtn hMargin fLeft shadow" ><input name="btn_submit" type="submit" id="btn_submit" value="修改" class="edit  imgButton" /></div>
                 	<div class="impBtn hMargin fLeft shadow" ><input type="button" name="Submit" value="返回" onclick="history.back()" class="return imgButton"/></div>
					<div class="impBtn hMargin fLeft shadow" ><input type="button" name="btn_add" value="同级新增" onclick="add()" style="width:100px"  class="add imgButton"/></div>
                 	<div class="impBtn hMargin fLeft shadow" ><input type="button" name="btn_addChild" value="下级新增" onclick="addChild()" style="width:100px" class="addChild imgButton"/></div>
                 	<div class="impBtn hMargin fLeft shadow" ><input type="button" name="btn_addChild" value="删除" onclick="del()" style="width:100px" class="del imgButton"/></div>
					<div class="impBtn hMargin fLeft shadow" ><input type="button" name="btn_addChild" value="移动" onclick="move_sort()" style="width:100px" class="move imgButton"/></div>

				  </td>
              </tr>
            </table></td>
          </tr>
        </table>
          <h3>&nbsp;</h3>
      </td>
      <td background="../Public/images/index1_47.gif"></td>
    </tr>
    <tr>
      <td width="8" height="8"><img src="../Public/images/index1_91.gif" width="8" height="8" /></td>
      <td background="../Public/images/index1_92.gif"></td>
      <td width="8" height="8"><img src="../Public/images/index1_93.gif" width="8" height="8" /></td>
    </tr>
  </table>
</form>



<!-- js 脚本 -->
<script language="javascript">
<!--
$(document).ready(function(){
	setListStyle("tb_list");


});


function validate()
{
	return validateForm();
}

function add()
{
	var url = '__URL__/add/pid/'+$("#pid").val();
	location.href = url;
}

function addChild()
{
	var url = '__URL__/add/pid/'+$("#id").val();
	location.href = url;
}

function del()
{
 	if( window.confirm("确定删除栏目吗？\r\n\r\n 此操作将会同时栏目内的文章！") )
 	{

    	var url = '__URL__/del/id/'+$("#id").val();
    	location.href = url;
 	}

}

function move_sort()
{
	
 	select_sort('__URL__/sel_sort/id/'+$("#id").val(),'移动栏目：'+$('#name').val(),function(dest_id){ 
		var sort_id =  $('#id').val();
		var url = '__URL__/moveTo/id/'+sort_id+'/pid/'+dest_id;
		location.href = url;
	});
}



//-->
</script>
<!-- 主页面结束 -->
<!-- 加载尾部公共文件 -->
<include file="../Public/foot" />